-- GENERATED SPELL FOR [Unbound Corrupter] --


function spell0_30868(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(38204,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30868', 1000, 1)
end

function spell1_30868(pUnit, Event) --@Ley Curse,n/a--
pUnit:FullCastSpellOnTarget(58667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30868', 32000, 1)
end

function spell2_30868(pUnit, Event) --@Transferred Power,n/a--
pUnit:FullCastSpellOnTarget(58187,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30868', 1269, 1)
end

function spell3_30868(pUnit, Event) --@Transferred Power,n/a--
pUnit:FullCastSpellOnTarget(58270,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30868', 30302, 1)
end

function Sorts_30868(pUnit, Event)
local choix_sorts_30868 = math.random(0, 3)
if choix_sorts_30868 == 0 then
pUnit:RegisterEvent('spell0_30868', 1, 1)
end
if choix_sorts_30868 == 1 then
pUnit:RegisterEvent('spell1_30868', 1, 1)
end
if choix_sorts_30868 == 2 then
pUnit:RegisterEvent('spell2_30868', 1, 1)
end
if choix_sorts_30868 == 3 then
pUnit:RegisterEvent('spell3_30868', 1, 1)
end
end

function mob30868_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30868', math.random(1500, 3000), 1)
end

function mob30868_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30868_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30868_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30868, 1, 'mob30868_Action')
RegisterUnitEvent(30868, 2, 'mob30868_Leave')
RegisterUnitEvent(30868, 3, 'mob30868_Kill')
RegisterUnitEvent(30868, 4, 'mob30868_Die')
